package com.cwd.arm.application.service.read.facade;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cwd.arm.application.dto.ProjectDetailDto;
import com.cwd.arm.application.dto.ProjectDto;
import com.cwd.arm.application.dto.confirmIncome.ProjectConfirmIncomeDto;
import com.cwd.arm.application.dto.project.*;
import com.cwd.arm.infrastructure.query.ProjectDaoQuery;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Description:项目
 * Created on 2021年11月16日
 *
 * @author yan
 */
@Service
public interface ProjectReadService {

    ProjectDto selectById(Long id);

    ProjectDetailDto selectDetailById(Long id);

    Page<ProjectDto> selectPage(ProjectDaoQuery query);

    List<ProjectDto> getProjectList(ProjectDaoQuery query);

    /**
     * 项目应收账款列表
     *
     * @param query
     * @return
     * @throws Exception
     */
    Page<ProjectReceivableAmountDto> selectReceivableAmountPage(ProjectDaoQuery query) throws Exception;

    /**
     * 项目应收帐款金额统计
     *
     * @return
     */
    ProjectReceivableAmountTotalDto selectReceivableAmountTotal(Integer year);


    /**
     * 获取项目现金流list
     * @param daoQuery
     * @return
     */
    List<ProjectReceivableAmountDto> getReceivableAmountList(ProjectDaoQuery daoQuery) throws Exception;

    /**
     * 收款计划
     *
     * @param query
     * @return
     * @throws Exception
     */
    Page<ProjectReceivePlanDto> selectReceivePlanPage(ProjectDaoQuery query) throws Exception;

    /**
     * 收款计划
     *
     * @param query
     * @return
     * @throws Exception
     */
    List<ProjectReceivePlanDto> getReceivePlanList(ProjectDaoQuery query) throws Exception;

    /**
     * 确认收入
     *
     * @param query
     * @return
     * @throws Exception
     */
    Page<ProjectConfirmIncomeDto> selectProjectConfirmIncome(ProjectDaoQuery query) throws Exception;

    List<ProjectConfirmIncomeDto> getConfirmIncomeList(ProjectDaoQuery query) throws Exception ;

    /**
     * 现金流
     *
     * @param query
     * @return
     */
    Page<ProjectCashFlowDto> selectProjectCashFlowPage(ProjectDaoQuery query);

    /**
     * 现金流统计
     *
     * @param year
     * @return
     */
    CashFlowTotalDto selectCashFlowTotal(Integer year);


    List<ProjectCashFlowDto> getCashList(ProjectDaoQuery daoQuery);


}
